| Conditions | 3 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 5 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | import { URL } from 'url' |
||
| 45 | toString () { |
||
| 46 | 22 | const completeUrl = new URL(Object.entries(this.path).reduce(this.urlReducer, this.url)) |
|
| 47 | 22 | Object.entries(this.searchParams).forEach(([searchParam, searchValue]) => { |
|
| 48 | 9 | if (searchValue) { |
|
| 49 | 7 | completeUrl.searchParams.append(searchParam, searchValue) |
|
| 50 | } |
||
| 51 | }) |
||
| 52 | |||
| 53 | 22 | return completeUrl.href |
|
| 54 | } |
||
| 55 | |||
| 74 |